//防抖
let timer = null
export const debounce = (fn, delay = 1000) => {
  if (timer != null) {
    clearTimeout(timer)
    timer = null
  }
  timer = setTimeout(fn, delay)
}
